<p>Check the items you wish to swap, and press "Go".</p>
<?php

Configure::write('debug', 2);

echo "<form name='basketswap' action='", $html->url(array('controller'=> 'members', 'action' => 'transfer', $members[1]['Member']['member_id'])), "' method='POST'>";
foreach($baskets as $n => $basket) {
	echo '<h2>', $members[$n]['Member']['first_name'], ' ', $members[$n]['Member']['last_name'], '</h2>';
	echo "<table>\n";
	foreach($basket as $item) {
		echo "<tr>\n";
		echo "<td>", $html->checkbox('BasketItem/' . $item['basket_items']['id'], null, array('value' => $members[1 - $n]['Member']['member_id'])), '</td><td>', $item['basket_items']['quantity'], ' ', $item['orderables']['ordered_by'], ' ', $item['product_list']['product_name'], "</td>\n";
		echo "</tr>\n";
	}
	echo "<tr><td></td><td>Checked items will move to ", $members[1 - $n]['Member']['first_name'], ' ', $members[1 - $n]['Member']['last_name'], "'s invoice.</td></tr>\n";
	echo '</table>';
}
echo $html->submit('Swap!');
echo '</form>';
pr($this->data);

?>